class ClickUtils {
  static var _lastPopTime;

  // 防重复提交
  static bool checkClick({int needTime = 1000}) {
    if (_lastPopTime == null ||
        DateTime.now().difference(_lastPopTime) >
            Duration(milliseconds: needTime)) {
      _lastPopTime = DateTime.now();
      return true;
    }
    return false;
  }
}
